using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Comteck.Winforms.Forms;

namespace Comteck.Winforms.Dialog {
  public partial class FrmDescriptionDialog : FrmDialogBase {
    public string Description { get; set; }
	
    public FrmDescriptionDialog() {
      InitializeComponent();
    }

    private void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
      var description = ckDescription.Text.TrimSafe();
      if (description.IsNullOrEmpty()) {
        this.ShowMsg("请填写备注信息!");
        return;
      }
      this.Description = ckDescription.Text.TrimSafe();
      if (this.Description.Length > 200) {
        this.ShowMsg("备注信息过长，最大长度为200");
        return;
      }
      this.DialogResult = DialogResult.OK;
      this.Close();
    }

    private void FrmDescriptionDialog_Load(object sender, EventArgs e) {

    }
  }
}
